package com.lfy.modules.blog.domain.dto.user;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

@Data
public class PwdDTO {
    @NotBlank(message = "参数有误")
    private String encryptedForm;
    @Data
    public static class PwdForm{
        @NotBlank(message = "旧密码不能为空")
        @Length(min = 6, max = 16, message = "密码长度必须在6到16之间")
        private String oldPassword;
        @NotBlank(message = "新密码不能为空")
        @Length(min = 6, max = 16, message = "密码长度必须在6到16之间")
        private String newPassword;
        @NotBlank(message = "确认密码不能为空")
        @Length(min = 6, max = 16, message = "密码长度必须在6到16之间")
        private String confirmPassword;
    }

}
